package com.visionet.waveletData.web.repository.business;

import java.util.List;

import javax.persistence.QueryHint;

import org.springframework.data.jpa.repository.Query;
import org.springframework.data.jpa.repository.QueryHints;
import org.springframework.data.repository.Repository;

import com.visionet.waveletData.web.entity.business.UserInfo;

public interface UserInfoDaoPlus  extends Repository<UserInfo, Long>{
	
	@Query("from UserInfo where DATE_FORMAT(birthday,'%m') = ?2 and orgId = ?1")
	public List<UserInfo> findCurrMothBirthUser(String month,Long orgId);
	
	@QueryHints({ @QueryHint(name = "org.hibernate.cacheable", value ="true") })
	public UserInfo findByIdAndIsLock(Long userId,Integer isLock);
	
	@QueryHints({ @QueryHint(name = "org.hibernate.cacheable", value ="true") })
	public UserInfo findByLoginName(String loginName);
}
